﻿@model IEnumerable<string>

<script src="../../Scripts/jquery.fileupload.js" type="text/javascript"></script>

<div id="accordion">
@{
    int iCounter=1;
    foreach (var item in Model)
    {
    <h3>@item</h3>
    <div id="showleads@(iCounter.ToString())"></div>
    iCounter++;
    }
}
</div>

<script type="text/javascript">
    $(document).ready(function () {

    $(function() {
        $( "#accordion" ).accordion({
          heightStyle: "content"
        });
    });

    @{
        iCounter=1;
        foreach(var item in Model)
        {
            <text>
                $("#showleads@(iCounter.ToString())").html('<div style="text-align: center;"><div><img src="@Url.Content("~/Images/ajaxspinner_large.gif")" alt="Loading..." style="margin: 20px;" /></div><div>Loading...</div></div>');
                $('#showleads@(iCounter.ToString())').load('@(Url.Action("ShowLeads", "QC"))?leadDate="@(item)"&leadid=@(ViewBag.LeadID)');
            </text>
            iCounter++;
        }
    }


    
    });
</script>